package ants

import (
	"errors"
	"time"
)

var (
	errQueueIsFull = errors.New("the queue is full")

	errQueueIsReleased = errors.New("the queue length is zero")
)

type arrayType int

const (
	stackType arrayType = 1 << iota
	loopQueueType
)

type workArray interface {
	len() int
	isEmpty() bool
	insert(worker *goWorker) error
	detach() *goWorker
	retrieveExpiry(duration time.Duration) []*goWorker
	reset()
}
